package reese.think_in_java.java_21_thread;

/**
 * ***********************************************************
 *
 * @类名 : reese.think_in_java.java_21_thread.类名
 * @DESCRIPTION : 这家伙太懒啥都没写
 * @AUTHOR :  一个风情万种的男子
 * @DATE : 2016/5/30
 * ***********************************************************
 */
public abstract class IntGenerator {

    private  volatile  boolean canceled = false ;

    public abstract int next();

    //allow this to be canceled

    public void cancel() {
        canceled = true ;
    }
    public boolean isCanceled() {
        return canceled ;
    }
}
